#pragma once
#include <Rz/Object.h>
#include <Rz/Graphics/Render/IEffectProperty.h>
#include <Rz/Graphics/Render/Libraries/OpenGL/API/GLDefinitions.h>

RZ_CLASS_FWD_DECL3(Rz, Graphics, Render, IEffect);
RZ_CLASS_FWD_DECL3(Rz, Graphics, Render, ITexture2D);
RZ_CLASS_FWD_DECL3(Rz, Graphics, Math, Vector2);
RZ_CLASS_FWD_DECL3(Rz, Graphics, Math, Vector3);
RZ_CLASS_FWD_DECL3(Rz, Graphics, Math, Vector4);
RZ_CLASS_FWD_DECL3(Rz, Graphics, Math, Matrix3);
RZ_CLASS_FWD_DECL3(Rz, Graphics, Math, Matrix4);

namespace Rz { namespace Graphics { namespace Render { namespace Libraries { namespace OpenGL {

class GLEffectProperty :
	public Object,
	public IEffectProperty
{
	friend class GLEffect;

	public:
		RZ_RTTI(Rz::Graphics::Render::Libraries::OpenGL, GLEffectProperty);
		RZ_RTTI_IMPLEMENTS(Object, IEffectProperty);
		RZ_RTTI_END;

		GLEffectProperty(IEffect* effect);
		GLEffectProperty(IEffect* effect, const String& name);
		~GLEffectProperty();

		void Init(const String& name);
		
	private:
		virtual void SetBool(bool value) override;
		virtual void SetInt32(s32 value) override;
		virtual void SetFloat(f32 value) override;
		virtual void SetVector2(const Math::Vector2& value) override;
		virtual void SetVector3(const Math::Vector3& value) override;
		virtual void SetVector4(const Math::Vector4& value) override;
		virtual void SetMatrix3(const Math::Matrix3& value) override;
		virtual void SetMatrix4(const Math::Matrix4& value) override;
		virtual void SetTexture2D(const ITexture2D* value) override;

		GLint _location;
};

} } } } }
